var Main = function()
{
	this.resize_timeout = null;
	
	this.init = function()
	{
		FieldMove.init();

        this.onResize();
        $(window).bind('resize', function() {
            if (Main.resize_timeout !== null) {
            	clearTimeout(Main.resize_timeout);
            }
            Main.resize_timeout = setTimeout(function() {
            	Main.onResize();
            }, 200);
        });
        
	};
	
	this.onResize = function()
	{
		var width = $(window).width();
		var height = $(window).height();
		
		FieldMove.onResize(width, height);
	};
};
Main = new Main;